﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UnitTestProject1 {
    class Car {
        public int Year;
        public string Make;
        public string Model;
        public double Length;

        public override bool Equals(object obj) {
            var c = obj as Car;
            if (c == null) return false;
            return Year==c.Year && Make==c.Make && Model==c.Model && Length==c.Length;
        }
    }
    class CarWithProperties {
        public int Year { get; set; }
        public string Make { get; set; }
        public string Model { get; set; }
        public double Length { get; set; }
    }

    class CarPrice {
        public int Year;
        public string Make;
        public string Model;
        public string Description;
        public decimal Price;

        public override bool Equals(object obj) {
            var c = obj as CarPrice;
            if (c == null) return false;
            return Year == c.Year && Make == c.Make && Model == c.Model && Description == c.Description && Price == c.Price;
        }
    }
}
